package com.winning.java.aop;

import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author: rqx
 * @create: 2023/6/5 11:37
 * @description:
 */
@Slf4j
@Component
public class BaseClass {

    public void call1() {
        log.info("BaseClass 1 called");

    }

    public void call2() {
        log.info("BaseClass 2 called");
    }

    @MyAnotaion
    public void call3() {
        log.info("BaseClass 3 called");

    }

    @SneakyThrows
    public void call4() {

        log.info("BaseClass 4 called");
        Thread.sleep(1000);
        throw new RuntimeException(" 抛出一个测试错误 ");

    }
}
